<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<!--引用公共的分页导航条组件-->
 <div aria-label="Page navigation" class="page" th:fragment="page-navbar">
    <ul class="pagination">
        <li class="page-item">
            <a>
                <span th:text="${'共&nbsp; '+ pageInfo.total +'&nbsp;条记录&nbsp;&nbsp;&nbsp;'+ pageInfo.pageNum + ' / '+pageInfo.pages+' 页&nbsp;&nbsp;&nbsp;&nbsp;'}"></span>
            </a>
        </li>
        <li class="page-item" th:if="${pageInfo.hasPreviousPage}">
            <a class="page-link" href="javascript:;" aria-label="Previous" th:onclick="'toSearch(1)' ">
                <span aria-hidden="true">首页</span>
            </a>
        </li>
        <li class="page-item" th:if="${pageInfo.hasPreviousPage}">
            <a class="page-link" href="javascript:;" aria-label="Previous" th:onclick="'toSearch(' + ${pageInfo.prePage} + ')' ">
                <span aria-hidden="true">上一页</span>
            </a>
        </li>
        <li th:class="'page-item '+ ${nav == pageInfo.pageNum ? 'active' : ''}" th:each="nav : ${pageInfo.navigatepageNums}">
            <a class="page-link" href="javascript:;" th:text="${nav}" th:onclick="'toSearch(' + ${nav} + ')'">1</a>
        </li>
        <li class="page-item" th:if="${pageInfo.hasNextPage}">
            <a class="page-link" href="javascript:;" aria-label="Previous" th:onclick="'toSearch(' + ${pageInfo.nextPage} + ')' ">
                <span aria-hidden="true">下一页</span>
            </a>
        </li>
        <li class="page-item" th:if="${pageInfo.hasNextPage}">
            <a class="page-link" href="javascript:;" aria-label="Previous" th:onclick="'toSearch(' + ${pageInfo.pages} + ')' ">
                <span aria-hidden="true">尾页</span>
            </a>
        </li>
    </ul>
</div>
</html>